{case value="text"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label">
        <input type="text" name="config[{$o_key}]" placeholder="请输入{$form.title}" autocomplete="off" class="layui-input" value="{$form.value}">
    </div>
    {if $form.tip}<div class="layui-form-mid layui-word-aux">{$form.tip|raw}</div>{/if}
</div>
{/case}
{case value="array"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label fieldlist" data-name="config[{$o_key}]" data-id="{$o_key}">
        <div class="arrBox"></div>
        <button type="button" class="layui-btn btn-append">追加</button>
        <textarea name="config[{$o_key}]" class="layui-textarea layui-hide">{$form.value|json_encode}</textarea>
    </div>
    <div class="layui-form-mid layui-word-aux">{if $form.tip}{$form.tip|raw}{/if}</div>
</div>
<script type="text/html" id="{$o_key}Tpl">
    <div class="layui-form-item rules-item">
        {{# layui.each(d.lists, function(index, item) { }}
        <div class="layui-input-inline" style="width:120px;">
            <input type="text" class="layui-input" name="{{item.name}}[{{item.index}}][key]" placeholder="键" value="{{item.row.key|| ''}}" />
        </div>
        <div class="layui-input-inline" style="width:120px;">
            <input type="text" class="layui-input" name="{{item.name}}[{{item.index}}][value]" placeholder="值" value="{{item.row.value|| ''}}" />
        </div>
        <label class="layui-form-mid">
            <button type="button" class="layui-btn layui-btn-danger btn-remove layui-btn-xs"><i class="iconfont icon-close"></i></button>
            <button type="button" class="layui-btn btn-dragsort layui-btn-xs"><i class="iconfont icon-yidong"></i></button>
    </div>
    {{# }); }}
    </div>
</script>
{/case}
{case value="checkbox"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label">
        {foreach name="form.options" item="opt" key="opt_k"}
        {php}
        is_null($form["value"]) && $form["value"] = array();
        {/php}
        <input type="checkbox" name="config[{$o_key}][]" lay-skin="primary" title="{$opt}" value="{$opt_k}" {in name="opt_k" value="$form.value"} checked{/in}>
        {/foreach}
    </div>
    {if $form.tip}<div class="layui-form-mid layui-word-aux">{$form.tip|raw}</div>{/if}
</div>
{/case}
{case value="textarea"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label">
        <textarea placeholder="请输入{$form.title}" class="layui-textarea" name="config[{$o_key}]">{$form.value}</textarea>
    </div>
    {if $form.tip}<div class="layui-form-mid layui-word-aux">{$form.tip|raw}</div>{/if}
</div>
{/case}
{case value="password"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label">
        <input type="password" name="config[{$o_key}]" placeholder="请输入{$form.title}" autocomplete="off" class="layui-input" value="{$form.value}">
    </div>
    {if $form.tip}<div class="layui-form-mid layui-word-aux">{$form.tip|raw}</div>{/if}
</div>
{/case}
{case value="radio"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label">
        {foreach name="form.options" item="opt" key="opt_k"}
        <input type="radio" name="config[{$o_key}]" value="{$opt_k}" title="{$opt}" {eq name="form.value" value="$opt_k"} checked{/eq}>
        {/foreach}
    </div>
    {if $form.tip}<div class="layui-form-mid layui-word-aux">{$form.tip|raw}</div>{/if}
</div>
{/case}
{case value="select"}
<div class="layui-form-item">
    <label class="">{$form.title}</label>
    <div class="layui-form-field-label">
        <select name="config[{$o_key}]">
            <option value=""></option>
            {foreach name="form.options" item="opt" key="opt_k"}
            <option value="{$opt_k}" {eq name="form.value" value="$opt_k"}selected{/eq}>{$opt}</option>
            {/foreach}
        </select>
    </div>
    {if $form.tip}<div class="layui-form-mid layui-word-aux">{$form.tip|raw}</div>{/if}
</div>
{/case}
{case value="block"}
<blockquote class="site-text layui-elem-quote" {if $form.style}style="{$form.style}"{/if}>{$form.title|raw}</blockquote>
{/case}
{case value="line"}
<div class="layui-form-item">
    <hr class="layui-bg-{$form.color|default='gray'}" {if $form.style}style="{$form.style}"{/if}>
</div>
{/case}